//

<template>
  <van-swipe class="my-swipe" :autoplay="5000" indicator-color="#1baeae">
    <van-swipe-item v-for="(item, index) in list" :key="index">
      <!-- <img :src="item.carouselUrl" alt="" @click="goTo(item.redirectUrl)" /> -->
      <img :src="item.carouselUrl" alt="" @click="goToDetail" />
    </van-swipe-item>
  </van-swipe>
</template>

<script>
export default {
  props: {
    list: {
      type: Array,
      default: null,
    },
  },
  methods: {
    // 原始跳转
    // goTo(url) {
    //   window.open(url);
    //   // console.log()
    // },

    goToDetail() {
      this.$router.push({
        path: "/SwiperDetails", ////首页轮播图详情
      });
    },
  },
};
</script>

<style lang='less' scoped>
.my-swipe .van-swipe-item {
  height: 200px;
  img {
    width: 100%;
    height: 100%;
  }
}
</style>
